import sys

# Read input arguments
[inputFile, outputFile, headerLine] = sys.argv[1:4]

fin = open(inputFile, 'r', encoding="latin-1")
fout = open(outputFile, 'w')

fout.write(headerLine + '\n')
for line in fin:
    fout.write(line)

fin.close()
fout.close()
